package com.beecloud.microservice.user.commom;

import com.beecloud.microservice.user.domain.dto.UserDTO;
import com.beecloud.microservice.user.entities.UserEntity;

import java.util.Objects;

public class Converts {
    public static UserDTO entity2DTO(UserEntity entity) {
        Objects.requireNonNull(entity);
        return new UserDTO(entity.getUserId(), entity.getUserRole(), entity.getPhone(), entity.getEmail(), entity.getUserName(), entity.getDriverLicense(), entity.getNickName());
    }
}
